home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 04 - 1988 / 04.11 Nov 88 / IAC / Editor Stuff / Editor.r < prev    next >
Encoding:
Text File  |  1988-09-18  |  9.3 KB  |  446 lines  |  [TEXT/MPS ]

  1. /*    resource file for the test editor */ 
  2.  
  3. #include "Types.r"
  4.  
  5. /* --- The Menus --- */
  6.  
  7. resource 'MENU' (128, "Apple", preload) {
  8.     128,
  9.     textMenuProc,
  10.     0x7FFFFFFD,    /* Disable item #2 */
  11.     enabled,
  12.     apple,
  13.     {
  14.         "About Sample…",
  15.             noicon, nokey, nomark, plain;
  16.         "-",
  17.             noicon, nokey, nomark, plain
  18.     }
  19. };
  20.  
  21. resource 'MENU' (129, "File", preload) {
  22.     129,
  23.     textMenuProc,
  24.     0x2F,
  25.     enabled,
  26.     "File",
  27.     {
  28.         "New",
  29.             noicon, "N", nomark, plain;        
  30.         "Open",
  31.             noicon, "O", nomark, plain;        
  32.         "Close",
  33.             noicon, noKey, nomark, plain;        
  34.         "Save",
  35.             noicon, "S", nomark, plain;        
  36.         "-",
  37.             noicon, nokey, nomark, plain;
  38.         "Quit",
  39.             noicon, "Q", nomark, plain
  40.     }
  41. };
  42.  
  43. resource 'MENU' (130, "Edit", preload) {
  44.     130, textMenuProc,
  45.     0x7FFFFFBD,    /* Disable items #1 & #2 */
  46.     enabled, "Edit",
  47.      {
  48.         "Undo",
  49.             noicon, "Z", nomark, plain;
  50.         "-",
  51.             noicon, nokey, nomark, plain;
  52.         "Cut",
  53.             noicon, "X", nomark, plain;
  54.         "Copy",
  55.             noicon, "C", nomark, plain;
  56.         "Paste",
  57.             noicon, "V", nomark, plain;
  58.         "Clear",
  59.             noicon, nokey, nomark, plain;
  60.         "-",
  61.             noicon, nokey, nomark, plain;
  62.         "Hot Copy",
  63.             noicon, nokey, nomark, plain;
  64.         "Hot Paste",
  65.             noicon, nokey, nomark, plain;
  66.         "Remove Link",
  67.             noicon, nokey, nomark, plain
  68.     }
  69. };
  70.  
  71. resource 'MENU' (131,"OptionsMenu",Preload) {
  72. 131,            /* ID */
  73. textMenuProc,    /* menu def proc ID */
  74. 0B11,                    /* item flags */
  75. enabled,            /* menu enable */
  76. "Options",
  77.     { "Show links",
  78.       noIcon,noKey,noMark,plain;
  79.         "Show link info",
  80.       noIcon,noKey,noMark,plain
  81.     }
  82. };
  83.  
  84. resource 'MENU' (132,"FontMenu",Preload) {
  85. 132,            /* ID */
  86. textMenuProc,    /* menu def proc ID */
  87. allEnabled,        /* item flags */
  88. enabled,            /* menu enable */
  89. "Font",
  90. }
  91. };
  92.  
  93. resource 'MENU' (133,"Sizes",Preload) {
  94. 133,            /* ID */
  95. textMenuProc,    /* menu def proc ID */
  96. 0B11111011111111,        /* item flags */
  97. enabled,            /* menu enable */
  98. "Size",
  99.     { "9",
  100.       noIcon,noKey,noMark,plain;
  101.       "10",
  102.       noIcon,noKey,noMark,plain;
  103.       "12",
  104.       noIcon,noKey,noMark,plain;
  105.       "14",
  106.       noIcon,noKey,noMark,plain;
  107.       "16",
  108.       noIcon,noKey,noMark,plain;
  109.       "20",
  110.       noIcon,noKey,noMark,plain;
  111.       "24",
  112.       noIcon,noKey,noMark,plain;
  113.       "28",
  114.       noIcon,noKey,noMark,plain;
  115.       "-",
  116.       noIcon,noKey,noMark,plain;
  117.       "Bold",
  118.       noIcon,"B",noMark,plain;
  119.       "Italic",
  120.       noIcon,"I",noMark,plain;
  121.       "Underlined",
  122.       noIcon,"U",noMark,plain;
  123.       "Outline",
  124.       noIcon,noKey,noMark,plain;
  125.       "Shadow",
  126.       noIcon,noKey,noMark,plain
  127.     }
  128. };
  129.  
  130. resource 'MENU' (134,"Links",Preload) {
  131. 134,            /* ID */
  132. textMenuProc,    /* menu def proc ID */
  133. 0xFFFFFFFF,        /* item flags */
  134. enabled,            /* menu enable */
  135. "Links",
  136. }
  137. };
  138.  
  139. /* --- The Windows --- */
  140.  
  141. resource 'WIND' (128,"a Window") {
  142.     {64, 60, 314, 460},
  143.     documentProc,
  144.     visible,
  145.     noGoAway,
  146.     0x0,
  147.     "Untitled"
  148. };
  149.  
  150. /* --- The Alerts/Dialogs (with DITLs) --- */
  151.  
  152. /* 128 is the about box */
  153. /* 129 is the link info box */
  154.  
  155. /* 256 is "No IAC" error box */
  156. /* 257 is the IAC error alert */
  157. /* 258 is the "Not in any extents" alert */
  158. /* 259 is the "Sure you want to kill this extent?" Alert */
  159. /* 260 is the "Save changes?" alert */
  160.  
  161. resource 'DLOG' (128,Purgeable) {
  162.     {61, 80, 301, 420},
  163.     altDBoxProc,
  164.     visible,
  165.     noGoAway,
  166.     0x0,
  167.     128,
  168.     "x"
  169. };
  170.  
  171. resource 'DITL' (128,Purgeable) {
  172.     {    
  173.         {200, 110, 225, 230},        /* [1] */
  174.         Button {enabled, "Wonderful!"},
  175.         {15, 65, 31, 275},            /* [2] */
  176.         StaticText {disabled,"The Great IAC Sample Program!"},
  177.         {40, 20, 56, 320},            /* [3] */
  178.         StaticText {disabled,"This copy: ^0"},
  179.         {60, 20, 124, 320},            /* [4] */
  180.         StaticText {disabled,"This sample is designed to show off the "
  181.             "var- ious capabilities of the  SAWS Inter- Application "
  182.             "Communications Driver. It may be used freely. Send questions, etc"
  183.             ", to: "},
  184.         {124, 119, 140, 219},        /* [5] */
  185.         StaticText {disabled,"Frank Alviani"},
  186.         {140, 120, 188, 220},        /* [6] */
  187.         StaticText {disabled,"P.O. Box 8744 Waukegan Ill 60079"}
  188.     }
  189. };
  190.  
  191.  
  192. resource 'DLOG' (129,"link info",Purgeable) {
  193.     {80, 86, 300, 426},
  194.     altDBoxProc,
  195.     visible,
  196.     noGoAway,
  197.     0x0,
  198.     129,
  199.     ""
  200. };
  201.  
  202. resource 'DITL' (129,Purgeable) {
  203.     {    {185, 130, 210, 210},        /* [1] */
  204.         Button {enabled,"OK!"},
  205.         {10, 20, 26, 320},            /* [2] */
  206.         StaticText {disabled,"Information About Current Registered Links"},
  207.         {35, 300, 170, 316},        /* [3] */
  208.         UserItem {enabled},
  209.         {35, 20, 170, 300},            /* [4] */
  210.         UserItem {disabled}
  211.     }
  212. };
  213.  
  214. /* Scroll bar for link-info dlog */
  215. resource 'CNTL' (129,Purgeable) {
  216.   {35,300,170,316},
  217.   0,    /* value */
  218.   visible,
  219.   0,    /* max */
  220.   0,    /* min */
  221.   scrollBarProc,    /* type */
  222.   0,    /* refcon */
  223.   "x"
  224. };
  225.  
  226.  
  227. resource 'ALRT' (256,Purgeable) {
  228.     {100, 100, 220, 400},
  229.     256,
  230.     {    OK, visible, sound1,    /* [1] */
  231.         OK, visible, sound1,    /* [2] */
  232.         OK, visible, sound1,    /* [3] */
  233.         OK, visible, sound1        /* [4] */
  234.     }
  235. };
  236.  
  237. resource 'DITL' (256,Purgeable) {
  238.     {    {90, 200, 110, 280},    /* [1] */
  239.         Button {enabled, "Rats!" },
  240.         {20, 72, 84, 280},        /* [2] */
  241.         StaticText {disabled,
  242.             "Unfortunately, we cannot find ^0. "
  243.             "Without it, there is no point in going on. Farewell..."};
  244.         {94,20,110,150},            /* [3] */
  245.         StaticText {disabled, "ID=^2"}
  246.     }
  247. };
  248.  
  249. resource 'ALRT' (257,Purgeable) {
  250.     {100, 100, 240, 400},
  251.     257,
  252.     {    OK, visible, sound1,    /* [1] */
  253.         OK, visible, sound1,    /* [2] */
  254.         OK, visible, sound1,    /* [3] */
  255.         OK, visible, sound1        /* [4] */
  256.     }
  257. };
  258.  
  259. resource 'DITL' (257,Purgeable) {
  260.     {    {105, 110, 130, 190},        /* [1] */
  261.         Button {enabled,"Rats!"},
  262.         {10, 67, 90, 280},            /* [2] */
  263.         StaticText {disabled,"IAC Error ^0 was encountered during the "
  264.             "^1 operation, which was not completed. Sorry!"}
  265.     }
  266. };
  267.  
  268.  
  269. resource 'ALRT' (258,Purgeable) {
  270.     {100, 100, 200, 400},
  271.     258,
  272.     {    OK, visible, sound1,    /* [1] */
  273.         OK, visible, sound1,    /* [2] */
  274.         OK, visible, sound1,    /* [3] */
  275.         OK, visible, sound1        /* [4] */
  276.     }
  277. };
  278.  
  279. resource 'DITL' (258,Purgeable) {
  280.     {    {70, 110, 95, 190},        /* [1] */
  281.         Button {enabled,"Rats!"},
  282.         {10, 62, 58, 290},        /* [2] */
  283.         StaticText {disabled,"Sorry! You are not in any extent."
  284.             "Therefore no link can be severed."}
  285.     }
  286. };
  287.  
  288.  
  289. resource 'ALRT' (259,Purgeable) {
  290.     {100, 100, 200, 400},
  291.     259,
  292.     {    OK, visible, sound1,    /* [1] */
  293.         OK, visible, sound1,    /* [2] */
  294.         OK, visible, sound1,    /* [3] */
  295.         OK, visible, sound1        /* [4] */
  296.     }
  297. };
  298.  
  299. resource 'DITL' (259,Purgeable) {
  300.     {    {65, 110, 90, 190},        /* [1] */
  301.         Button {enabled,"Rats!"},
  302.         {10, 62, 42, 290},        /* [2] */
  303.         StaticText {disabled,"Are you SURE you want to  remove this "
  304.             "link? This cannot be undone."}
  305.     }
  306. };
  307.  
  308. resource 'ALRT' (260, Purgeable) {
  309.     {100, 100, 250, 400},
  310.     260,
  311.     {    OK, visible, sound1,    /* [1] */
  312.         OK, visible, sound1,    /* [2] */
  313.         OK, visible, sound1,    /* [3] */
  314.         OK, visible, sound1        /* [4] */
  315.     }
  316. };
  317.  
  318. resource 'DITL' (260, Purgeable) {
  319.     {    {80, 15, 105, 95},        /* [1] */
  320.         Button {enabled,"Save"},
  321.         {115, 15, 140, 95},        /* [2] */
  322.         Button {enabled,"Cancel"},
  323.         {116, 205, 141, 285},    /* [3] */
  324.         Button {enabled,"No"},
  325.         {15, 75, 63, 285},        /* [4] */
  326.         StaticText {disabled,"Do you want to save the changes made to ^0?"}
  327.     }
  328. };
  329.  
  330.  
  331. resource 'ALRT' (261,Purgeable) {
  332.     {100, 100, 200, 400},
  333.     261,
  334.     {    OK, visible, sound1,    /* [1] */
  335.         OK, visible, sound1,    /* [2] */
  336.         OK, visible, sound1,    /* [3] */
  337.         OK, visible, sound1        /* [4] */
  338.     }
  339. };
  340.  
  341. resource 'DITL' (261,Purgeable) {
  342.     {    {70, 110, 95, 190},        /* [1] */
  343.         Button {enabled,"OK"},
  344.         {10, 62, 58, 290},        /* [2] */
  345.         StaticText {disabled,"Doc_ID = ^0 hatCheck = ^1"}
  346.     }
  347. };
  348.  
  349.  
  350. /* --- Miscellaneous Resources --- */
  351.  
  352. resource 'SIZE' (-1) {
  353.         dontSaveScreen,
  354.         acceptSuspendResumeEvents,
  355.         disableOptionSwitch,
  356.         canBackground,
  357.         multiFinderAware,
  358.         98304,                                        /* preferrred size = 128K - 32k */
  359.         98304                                            /* min size = 128K - 32k */
  360. };
  361.  
  362. type 'IAC1' as 'STR ';
  363.  
  364. resource 'IAC1' (0) {
  365.     "Sample IAC Application - Version 1.0ß1"
  366. };
  367.  
  368. resource 'ICN#' (128, Purgeable) {
  369.     {    /* array: 2 elements */
  370.         /* [1] */
  371.         $"0001 0400 0002 8A00 0004 5100 0008 2080"
  372.         $"0010 1140 0022 08A0 0044 BFD0 0089 C288"
  373.         $"0101 C104 02A4 9082 054C 2041 080E 4020"
  374.         $"113C 8010 2249 0008 44A0 3F04 8124 4082"
  375.         $"4248 8041 2093 3022 1123 C814 084E 7F8F"
  376.         $"0412 B007 0221 8007 0100 A007 0080 6007"
  377.         $"0040 1FE7 0020 021F 0010 0417 0008 0820"
  378.         $"0004 1040 0002 2880 0001 4500 0000 8200",
  379.         /* [2] */
  380.         $"0001 0400 0003 8E00 0007 DF00 000F FF80"
  381.         $"001F FFC0 003F FFE0 007F FFF0 00FF FFF8"
  382.         $"01FF FFFC 03FF FFFE 07FF FFFF 0FFF FFFF"
  383.         $"1FFF FFFF 3FFF FFFF 7FFF FFFF FFFF FFFF"
  384.         $"7FFF FFFF 3FFF FFFF 1FFF FFFF 0FFF FFFF"
  385.         $"07FF FFFF 03FF FFFF 01FF FFFF 00FF FFFF"
  386.         $"007F FFFF 003F FFFF 001F FFF7 000F FFE0"
  387.         $"0007 FFC0 0003 EF80 0001 C700 0000 8200"
  388.     }
  389. };
  390.  
  391. resource 'ICN#' (129, purgeable) {
  392.     {    /* array: 2 elements */
  393.         /* [1] */
  394.         $"0FFF FC00 0800 0600 0800 05C0 0800 04A0"
  395.         $"08F8 0450 0800 0428 081F E7F4 0800 0012"
  396.         $"081F E01F 0800 0011 0803 FC11 0800 001D"
  397.         $"081F 0011 0800 0011 081F FE11 0800 001D"
  398.         $"08FF E011 0800 0011 083C 0019 0800 0011"
  399.         $"080F C011 0800 001D 080F F811 0800 0011"
  400.         $"08FC 0019 0800 0011 083F E011 0800 001D"
  401.         $"0807 FE11 0800 0011 0800 0011 0FFF FFF1",
  402.         /* [2] */
  403.         $"0FFF FC00 0FFF FE00 0FFF FFC0 0FFF FFE0"
  404.         $"0FFF FFF0 0FFF FFF8 0FFF FFFC 0FFF FFFE"
  405.         $"0FFF FFFF 0FFF FFFF 0FFF FFFF 0FFF FFFF"
  406.         $"0FFF FFFF 0FFF FFFF 0FFF FFFF 0FFF FFFF"
  407.         $"0FFF FFFF 0FFF FFFF 0FFF FFFF 0FFF FFFF"
  408.         $"0FFF FFFF 0FFF FFFF 0FFF FFFF 0FFF FFFF"
  409.         $"0FFF FFFF 0FFF FFFF 0FFF FFFF 0FFF FFFF"
  410.         $"0FFF FFFF 0FFF FFFF 0FFF FFFF 0FFF FFFF"
  411.     }
  412. };
  413.  
  414. resource 'BNDL' (128) {
  415.     'IAC1',
  416.     0,
  417.     {
  418.         'ICN#',
  419.         {
  420.             0, 128;
  421.             1, 129
  422.         },
  423.         'FREF',
  424.         {
  425.             0, 128;
  426.             1, 129
  427.         }
  428.     }
  429. };
  430.  
  431. resource 'FREF' (128, purgeable) {
  432.     'APPL',
  433.     0,
  434.     ""
  435. };
  436.  
  437. resource 'FREF' (129, purgeable) {
  438.     'TEXT',
  439.     1,
  440.     ""
  441. };
  442.  
  443. include $$Shell("hlxEtc") "editor.code";        /* make sure we get code segments in! */
  444.